package thread.demo.priorityBlockingQueue;

import java.util.concurrent.PriorityBlockingQueue;

public class PriorityBlockingQueueTest001 {
  public static void main(String[] args) throws InterruptedException {
    PriorityBlockingQueue<Integer> queue = new PriorityBlockingQueue<>();
    queue.offer(10);
    queue.offer(99);
    queue.offer(9);
    queue.offer(100);
    
    System.out.println(queue.poll());
    System.out.println(queue.poll());
    System.out.println(queue.poll());
    System.out.println(queue.poll());
  }
}
